package org.apache.flink.runtime.resourceconsumer.factories;

import java.util.UUID;
import java.util.concurrent.CompletableFuture;

import org.apache.flink.runtime.consumermanager.OnCompletionActions;
import org.apache.flink.runtime.resourceconsumer.ResourceConsumerService;

/**
 * @类名: ResourceConsumerServiceFactory
 * @说明: 资源消费者服务工厂
 *        ResourceConsumerService实现，即ResourceConsumer实现
 *
 * @author   leehom
 * @Date	 2023年10月26日 上午11:34:20
 * 修改记录：
 *
 * @see 	 
 */
public interface ResourceConsumerServiceFactory {

    /**
     * Creates a new {@link ResourceConsumerService} for the given leaderSessionId and onCompletionActions.
     *
     * @param leaderSessionId leaderSessionId for which to create a {@link ResourceConsumerService}
     * @param onCompletionActions onCompletionActions which are given to the created {@link
     *     JobMasterService}
     * @return Future which contains the newly created {@link JobMasterService}
     */
    CompletableFuture<ResourceConsumerService> createResourceConsumerService(
            UUID leaderSessionId, OnCompletionActions onCompletionActions);
}
